﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a 2D data code reader.</summary>
	// Token: 0x0200002C RID: 44
	[Serializable]
	public class HDataCode2D : HHandle, ISerializable, ICloneable
	{
		// Token: 0x060003CF RID: 975 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDataCode2D() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x060003D0 RID: 976 RVA: 0x00016920 File Offset: 0x00014B20
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDataCode2D(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x060003D1 RID: 977 RVA: 0x0001692F File Offset: 0x00014B2F
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDataCode2D(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x060003D2 RID: 978 RVA: 0x0001693E File Offset: 0x00014B3E
		private void AssertSemType()
		{
			base.AssertSemType("datacode_2d");
		}

		// Token: 0x060003D3 RID: 979 RVA: 0x0001694B File Offset: 0x00014B4B
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDataCode2D obj)
		{
			obj = new HDataCode2D(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x060003D4 RID: 980 RVA: 0x00016964 File Offset: 0x00014B64
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDataCode2D[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HDataCode2D[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HDataCode2D(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Read a 2D data code model from a file and create a new model.
		///   Modified instance represents: Handle of the created 2D data code model.
		/// </summary>
		/// <param name="fileName">Name of the 2D data code model file. Default: "data_code_model.dcm"</param>
		// Token: 0x060003D5 RID: 981 RVA: 0x000169D4 File Offset: 0x00014BD4
		public HDataCode2D(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1774);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a 2D data code class.
		///   Modified instance represents: Handle for using and accessing the 2D data code model.
		/// </summary>
		/// <param name="symbolType">Type of the 2D data code. Default: "Data Matrix ECC 200"</param>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		// Token: 0x060003D6 RID: 982 RVA: 0x00016A20 File Offset: 0x00014C20
		public HDataCode2D(string symbolType, HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1778);
			HalconAPI.StoreS(proc, 0, symbolType);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.Store(proc, 2, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a 2D data code class.
		///   Modified instance represents: Handle for using and accessing the 2D data code model.
		/// </summary>
		/// <param name="symbolType">Type of the 2D data code. Default: "Data Matrix ECC 200"</param>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		// Token: 0x060003D7 RID: 983 RVA: 0x00016A88 File Offset: 0x00014C88
		public HDataCode2D(string symbolType, string genParamName, string genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1778);
			HalconAPI.StoreS(proc, 0, symbolType);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.StoreS(proc, 2, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		// Token: 0x060003D8 RID: 984 RVA: 0x00016AE4 File Offset: 0x00014CE4
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeDataCode2dModel();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x060003D9 RID: 985 RVA: 0x00016B1C File Offset: 0x00014D1C
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDataCode2D(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeDataCode2dModel(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x060003DA RID: 986 RVA: 0x00016B5C File Offset: 0x00014D5C
		public new void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeDataCode2dModel();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x060003DB RID: 987 RVA: 0x00016B70 File Offset: 0x00014D70
		public new static HDataCode2D Deserialize(Stream stream)
		{
			HDataCode2D hdataCode2D = new HDataCode2D();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hdataCode2D.DeserializeDataCode2dModel(hserializedItem);
			hserializedItem.Dispose();
			return hdataCode2D;
		}

		// Token: 0x060003DC RID: 988 RVA: 0x00016B96 File Offset: 0x00014D96
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x060003DD RID: 989 RVA: 0x00016BA0 File Offset: 0x00014DA0
		public new HDataCode2D Clone()
		{
			HSerializedItem hserializedItem = this.SerializeDataCode2dModel();
			HDataCode2D hdataCode2D = new HDataCode2D();
			hdataCode2D.DeserializeDataCode2dModel(hserializedItem);
			hserializedItem.Dispose();
			return hdataCode2D;
		}

		/// <summary>
		///   Access iconic objects that were created during the search for 2D data code symbols.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="candidateHandle">Handle of the 2D data code candidate. Either an integer (usually the ResultHandle of find_data_code_2d) or a string representing a group of candidates. Default: "all_candidates"</param>
		/// <param name="objectName">Name of the iconic object to return. Default: "candidate_xld"</param>
		/// <returns>Objects that are created as intermediate results during the detection or evaluation of 2D data codes.</returns>
		// Token: 0x060003DE RID: 990 RVA: 0x00016BC8 File Offset: 0x00014DC8
		public HObject GetDataCode2dObjects(HTuple candidateHandle, string objectName)
		{
			IntPtr proc = HalconAPI.PreCall(1766);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, objectName);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(candidateHandle);
			HObject result;
			num = HObject.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Access iconic objects that were created during the search for 2D data code symbols.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="candidateHandle">Handle of the 2D data code candidate. Either an integer (usually the ResultHandle of find_data_code_2d) or a string representing a group of candidates. Default: "all_candidates"</param>
		/// <param name="objectName">Name of the iconic object to return. Default: "candidate_xld"</param>
		/// <returns>Objects that are created as intermediate results during the detection or evaluation of 2D data codes.</returns>
		// Token: 0x060003DF RID: 991 RVA: 0x00016C28 File Offset: 0x00014E28
		public HObject GetDataCode2dObjects(int candidateHandle, string objectName)
		{
			IntPtr proc = HalconAPI.PreCall(1766);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, objectName);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HObject result;
			num = HObject.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get the alphanumerical results that were accumulated during the search for 2D data code symbols.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="candidateHandle">Handle of the 2D data code candidate. Either an integer (usually the ResultHandle of find_data_code_2d) or a string representing a group of candidates. Default: "all_candidates"</param>
		/// <param name="resultNames">Names of the results of the 2D data code to return. Default: "status"</param>
		/// <returns>List with the results.</returns>
		// Token: 0x060003E0 RID: 992 RVA: 0x00016C80 File Offset: 0x00014E80
		public HTuple GetDataCode2dResults(HTuple candidateHandle, HTuple resultNames)
		{
			IntPtr proc = HalconAPI.PreCall(1767);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, candidateHandle);
			HalconAPI.Store(proc, 2, resultNames);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(candidateHandle);
			HalconAPI.UnpinTuple(resultNames);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get the alphanumerical results that were accumulated during the search for 2D data code symbols.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="candidateHandle">Handle of the 2D data code candidate. Either an integer (usually the ResultHandle of find_data_code_2d) or a string representing a group of candidates. Default: "all_candidates"</param>
		/// <param name="resultNames">Names of the results of the 2D data code to return. Default: "status"</param>
		/// <returns>List with the results.</returns>
		// Token: 0x060003E1 RID: 993 RVA: 0x00016CE4 File Offset: 0x00014EE4
		public HTuple GetDataCode2dResults(string candidateHandle, string resultNames)
		{
			IntPtr proc = HalconAPI.PreCall(1767);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, candidateHandle);
			HalconAPI.StoreS(proc, 2, resultNames);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Detect and read 2D data code symbols in an image or train the 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="image">Input image. If the image has a reduced domain, the data code search is reduced to that domain. This usually reduces the runtime of the operator. However, if the datacode is not fully inside the domain, the datacode might not be found correctly. In rare cases, data codes may be found outside the domain. If these results  are undesirable, they have to be subsequently eliminated. </param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		/// <param name="resultHandles">Handles of all successfully decoded 2D data code symbols.</param>
		/// <param name="decodedDataStrings">Decoded data strings of all detected 2D data code symbols in the image.</param>
		/// <returns>XLD contours that surround the successfully decoded data code symbols. The order of the contour points reflects the orientation of the detected symbols. The contours begin in the top left corner (see 'orientation' at get_data_code_2d_results) and continue clockwise.  Alignment{left} Figure[1][1][60]{get_data_code_2d_results-xld_qrcode} Order of points of SymbolXLDs Figure Alignment @f$ </returns>
		// Token: 0x060003E2 RID: 994 RVA: 0x00016D3C File Offset: 0x00014F3C
		public HXLDCont FindDataCode2d(HImage image, HTuple genParamName, HTuple genParamValue, out HTuple resultHandles, out HTuple decodedDataStrings)
		{
			IntPtr proc = HalconAPI.PreCall(1768);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.Store(proc, 2, genParamValue);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HXLDCont result;
			num = HXLDCont.LoadNew(proc, 1, num, out result);
			num = HTuple.LoadNew(proc, 0, HTupleType.INTEGER, num, out resultHandles);
			num = HTuple.LoadNew(proc, 1, num, out decodedDataStrings);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Detect and read 2D data code symbols in an image or train the 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="image">Input image. If the image has a reduced domain, the data code search is reduced to that domain. This usually reduces the runtime of the operator. However, if the datacode is not fully inside the domain, the datacode might not be found correctly. In rare cases, data codes may be found outside the domain. If these results  are undesirable, they have to be subsequently eliminated. </param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		/// <param name="resultHandles">Handles of all successfully decoded 2D data code symbols.</param>
		/// <param name="decodedDataStrings">Decoded data strings of all detected 2D data code symbols in the image.</param>
		/// <returns>XLD contours that surround the successfully decoded data code symbols. The order of the contour points reflects the orientation of the detected symbols. The contours begin in the top left corner (see 'orientation' at get_data_code_2d_results) and continue clockwise.  Alignment{left} Figure[1][1][60]{get_data_code_2d_results-xld_qrcode} Order of points of SymbolXLDs Figure Alignment @f$ </returns>
		// Token: 0x060003E3 RID: 995 RVA: 0x00016DD8 File Offset: 0x00014FD8
		public HXLDCont FindDataCode2d(HImage image, string genParamName, int genParamValue, out int resultHandles, out string decodedDataStrings)
		{
			IntPtr proc = HalconAPI.PreCall(1768);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.StoreI(proc, 2, genParamValue);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HXLDCont result;
			num = HXLDCont.LoadNew(proc, 1, num, out result);
			num = HalconAPI.LoadI(proc, 0, num, out resultHandles);
			num = HalconAPI.LoadS(proc, 1, num, out decodedDataStrings);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Set selected parameters of the 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that shall be adjusted for the 2D data code. Default: "polarity"</param>
		/// <param name="genParamValue">Values of the generic parameters that are adjusted for the 2D data code. Default: "light_on_dark"</param>
		// Token: 0x060003E4 RID: 996 RVA: 0x00016E64 File Offset: 0x00015064
		public void SetDataCode2dParam(HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1769);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.Store(proc, 2, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set selected parameters of the 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that shall be adjusted for the 2D data code. Default: "polarity"</param>
		/// <param name="genParamValue">Values of the generic parameters that are adjusted for the 2D data code. Default: "light_on_dark"</param>
		// Token: 0x060003E5 RID: 997 RVA: 0x00016EB4 File Offset: 0x000150B4
		public void SetDataCode2dParam(string genParamName, string genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1769);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.StoreS(proc, 2, genParamValue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Get one or several parameters that describe the 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the 2D data code model. Default: "polarity"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x060003E6 RID: 998 RVA: 0x00016EF8 File Offset: 0x000150F8
		public HTuple GetDataCode2dParam(HTuple genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1770);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get one or several parameters that describe the 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the 2D data code model. Default: "polarity"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x060003E7 RID: 999 RVA: 0x00016F50 File Offset: 0x00015150
		public HTuple GetDataCode2dParam(string genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1770);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Get for a given 2D data code model the names of the generic parameters or objects that can be used in the other 2D data code operators.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="queryName">Name of the parameter group. Default: "get_result_params"</param>
		/// <returns>List containing the names of the supported generic parameters.</returns>
		// Token: 0x060003E8 RID: 1000 RVA: 0x00016FA0 File Offset: 0x000151A0
		public HTuple QueryDataCode2dParams(string queryName)
		{
			IntPtr proc = HalconAPI.PreCall(1771);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, queryName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Deserialize a serialized 2D data code model.
		///   Modified instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x060003E9 RID: 1001 RVA: 0x00016FF0 File Offset: 0x000151F0
		public void DeserializeDataCode2dModel(HSerializedItem serializedItemHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1772);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>
		///   Serialize a 2D data code model.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x060003EA RID: 1002 RVA: 0x00017044 File Offset: 0x00015244
		public HSerializedItem SerializeDataCode2dModel()
		{
			IntPtr proc = HalconAPI.PreCall(1773);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Read a 2D data code model from a file and create a new model.
		///   Modified instance represents: Handle of the created 2D data code model.
		/// </summary>
		/// <param name="fileName">Name of the 2D data code model file. Default: "data_code_model.dcm"</param>
		// Token: 0x060003EB RID: 1003 RVA: 0x0001708C File Offset: 0x0001528C
		public void ReadDataCode2dModel(string fileName)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1774);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Writes a 2D data code model into a file.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		/// <param name="fileName">Name of the 2D data code model file. Default: "data_code_model.dcm"</param>
		// Token: 0x060003EC RID: 1004 RVA: 0x000170D8 File Offset: 0x000152D8
		public void WriteDataCode2dModel(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1775);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Delete a 2D data code model and free the allocated memory.
		///   Instance represents: Handle of the 2D data code model.
		/// </summary>
		// Token: 0x060003ED RID: 1005 RVA: 0x00017114 File Offset: 0x00015314
		public void ClearDataCode2dModel()
		{
			IntPtr proc = HalconAPI.PreCall(1777);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a 2D data code class.
		///   Modified instance represents: Handle for using and accessing the 2D data code model.
		/// </summary>
		/// <param name="symbolType">Type of the 2D data code. Default: "Data Matrix ECC 200"</param>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		// Token: 0x060003EE RID: 1006 RVA: 0x00017148 File Offset: 0x00015348
		public void CreateDataCode2dModel(string symbolType, HTuple genParamName, HTuple genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1778);
			HalconAPI.StoreS(proc, 0, symbolType);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.Store(proc, 2, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a model of a 2D data code class.
		///   Modified instance represents: Handle for using and accessing the 2D data code model.
		/// </summary>
		/// <param name="symbolType">Type of the 2D data code. Default: "Data Matrix ECC 200"</param>
		/// <param name="genParamName">Names of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		/// <param name="genParamValue">Values of the generic parameters that can be adjusted for the 2D data code model. Default: []</param>
		// Token: 0x060003EF RID: 1007 RVA: 0x000171B0 File Offset: 0x000153B0
		public void CreateDataCode2dModel(string symbolType, string genParamName, string genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1778);
			HalconAPI.StoreS(proc, 0, symbolType);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.StoreS(proc, 2, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}
	}
}
